package com.hongyuan.sellcoach.ui.home.view_mode;

import androidx.annotation.NonNull;
import androidx.databinding.ObservableField;

import com.hongyuan.mvvmhabitx.binding.command.BindingCommand;
import com.hongyuan.sellcoach.base.ItemViewModel;
import com.hongyuan.sellcoach.ui.home.beans.StudentsBeans;

public class AppointmentStudentsItemViewModel extends ItemViewModel<AppointmentStudentsViewMode> {

    public ObservableField<StudentsBeans.ListBean> entity = new ObservableField<>();

    public AppointmentStudentsItemViewModel(@NonNull AppointmentStudentsViewMode viewModel, StudentsBeans.ListBean bean) {
        super(viewModel);
        entity.set(bean);
    }

    //条目的点击事件
    public BindingCommand itemClick = new BindingCommand(() -> {
        viewModel.getUC().getCallTel().setValue(entity.get().getM_mobile());
    });
}
